import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home/Home'
import City from '@/pages/City/City'
import Detail from '@/pages/detail/Detail'
import Scenic from '@/pages/Scenic/Scenic'
import Hotspots from '@/pages/Hotspots/Hotspots'
import xshow from '@/pages/xshow/xshow'

Vue.use(Router)

export default new Router({
    // mode: "history",
    routes: [{
            path: '/',
            name: 'xshow',
            component: xshow
        },
        {
            path: '/city',
            name: 'City',
            component: City
        },
        {
            path: '/detail/:id',
            name: 'Detail',
            component: Detail
        },
        {
            path: '/Scenic/:id',
            name: 'Scenic',
            component: Scenic
        },
        {
            path: '/Hotspots/:id',
            name: 'Hotspots',
            component: Hotspots
        },
        {
            path: '/home',
            name: 'Home',
            component: Home
        }
    ],
    scrollBehavior(to, from, savedPosition) {
        return { x: 0, y: 0 }
    }
})